[% setvar title Perl6 Summary for the week ending 20020818 %]
<div id="archive-notice">
    <h3>This file is part of the Perl 6 Archive</h3>
    <p>To see what is currently happening visit <a href="http://www.perl6.org/">http://www.perl6.org/</a></p>
</div>
<div class='pod'>
<a name='Perl6 Summary for the week ending 20020818'></a><h1>Perl6 Summary for the week ending 20020818</h1>
<p>The story so far... Larry, Tom, Randal, Damian, Jon, Chip, Gnat,
Ziggy, Dick and the rest of the gang were chatting with all the other
cool Perl kids about where Perl was and should be going. Then Jon
threw a coffee cup and the rest is history...</p>
<p>So, as is now traditional, we'll kick off with the goings on in
perl6-internals. Confused? You will be after this week's summary.</p>
<a name='Scratchpad.pmc'></a><h2>Scratchpad.pmc</h2>
<p>Jonathan Sillito harrassed Dan about subroutines, continuations and
and other things to do with function calls. He wondered if his
<code>scratchpad.pmc</code> patch fitted what Dan had in mind, and added a few
supplementary questions. Dan answered the supplementary questions and
apologised for not having done the docs on this bit of the design,
saying he'd try and get it out by the end of the week. Melvin Smith
(whose code was involved in some of the questions) also gave some
answers.</p>
<p><a href='http://groups.google.com/groups?threadm=1029179400.8276.37.camel@localhost.localdomain' target='_blank'>groups.google.com</a> -- Questions</p>
<p><a href='http://groups.google.com/groups?threadm=a05111b14b97e57d7b23d@' target='_blank'>groups.google.com</a>[63.120.19.221] -- Answers.</p>
<p><a href='http://groups.google.com/groups?threadm=5.1.0.14.2.20020812225655.030231f0@pop.mindspring.com' target='_blank'>groups.google.com</a> -- More
answers</p>
<a name='Perl 6 regexes...'></a><h2>Perl 6 regexes...</h2>
<p>Last week Dan threw down the 'full perl 6 regex engine' gauntlet, and
this week Sean &quot;Hero&quot; O'Rourke admitted that he was working on it and
that he already had a good chunk of it working. Apparently
hypothetical variables and the various cut operators are looking a
little tricky. Dan was impressed. Simon Cozens told us that, when he said
he'd written a Perl 6 regex parser before breakfast at YAPC, he hadn't
been joking, and that he'd put it up in his CVS if people want to poke
at it. But the crowd was strangely silent.</p>
<p>Steve Fink also had some questions to ask about the regex engine.</p>
<p><a href='http://groups.google.com/groups?threadm=a05111b05b97cecb019c0@' target='_blank'>groups.google.com</a>[63.120.19.221]</p>
<p><a href='http://groups.google.com/groups?threadm=Pine.GSO.4.32.0208112148510.13607-100000@gradlab.ucsd.edu' target='_blank'>groups.google.com</a></p>
<p><a href='http://groups.google.com/groups?threadm=86eld4pj4y.fsf@squash.oucs.ox.ac.uk' target='_blank'>groups.google.com</a></p>
<p><a href='http://groups.google.com/groups?threadm=20020815204744.GB6028@foxglove.digital-integrity.com' target='_blank'>groups.google.com</a></p>
<a name='[COMMIT] GC_DEBUG, Some GC Fixes, and Remaining GC Bugs'></a><h2>[COMMIT] GC_DEBUG, Some GC Fixes, and Remaining GC Bugs</h2>
<p>Mike Lambert has re-added the GC_DEBUG define. The idea behind this is
to allow `various limits and settings and logic to be setup such that
GC bugs occur relatively soon after the offending code.' and generally
to let you write relatively simple code that will trip the kind of
bugs that are normally only seen when running complex code. Mike also
listed the areas where he knows there are still problems.</p>
<p>Various people have had problems using GC_DEBUG, including at least
one instance where <code>&lt;end</code>&gt; threw a segfault, but it also drew a
flurry of patches from Jason Gloudon and Steve Fink. Much of the
discussion in this thread was rather more technical than I have the
skills to summarize, so I'll just point you at the root node.</p>
<p><a href='http://groups.google.com/groups?threadm=Pine.LNX.4.44.0208120349360.9252-100000@jall.org' target='_blank'>groups.google.com</a></p>
<a name='[PATCH] quotematch speedup'></a><h2>[PATCH] quotematch speedup</h2>
<p>Joseph Ryan did some regex optimization in assemble.pl to speed up the
matching of strings. For some reason, this kicked off the longest
thread of the week, about the merits of optimizing a pure perl
assembler when we should really do it in C if we <code>really</code> wanted
speed. Or maybe we should implement the assembler in Parrot
proper. And wouldn't it be cool if we could write self modifying code
in Parrot (needed for eval, Dan's working on a design). Juergen
Boemmels spotted that the patch didn't quite work as promised and
provided a better version, but I don't think it's been applied.</p>
<p><a href='http://rt.perl.org/rt2/Ticket/Display.html?id=16144' target='_blank'>rt.perl.org</a></p>
<a name='Keyed access to PerlArray/PerlHash'></a><h2>Keyed access to PerlArray/PerlHash</h2>
<p>Tom Hughes wondered about the semantics of indexing PerlArrays with
strings and PerlHashes with integers. He and Dan discussed it back and
forth for a while, and then Tom posted a patch, which Dan liked the
look of, but held off on applying while everyone else had a good
look. Mike Lambert had a look and raised some issues, which Tom
addressed and issued another, enormous patch.</p>
<p><a href='http://groups.google.com/groups?threadm=4cdafa644b.tom@compton.compton.nu' target='_blank'>groups.google.com</a></p>
<p><a href='http://rt.perl.org/rt2/Ticket/Display.html?id=16274' target='_blank'>rt.perl.org</a></p>
<p><a href='http://groups.google.com/groups?threadm=b9a604684b.tom@compton.compton.nu' target='_blank'>groups.google.com</a></p>
<a name='[PASM] problem opening / reading file'></a><h2>[PASM] problem opening / reading file</h2>
<p>Jerome Quelin has been having some problems with file I/O under parrot
0.0.7. The consensus seems to be that the current Parrot I/O system
is, ahem, not as good as it could be, mostly because people have had
other priorities. Dan asked for a volunteer to help `get I/O off of
Melvin's altogether too-full plate before his wife hunts [Dan] down
and does nasty things'. Clinton Pierce seems to have stepped up to
handle part of what Dan wants. Well done that man.</p>
<p><a href='http://groups.google.com/groups?threadm=3D49FF79003D8FCF@mel-rta8.wanadoo.fr' target='_blank'>groups.google.com</a></p>
<p><a href='http://groups.google.com/groups?threadm=a05111b12b97e572a89b7@' target='_blank'>groups.google.com</a>[63.120.19.221]</p>
<a name='set Boolean to 2'></a><h2>set Boolean to 2</h2>
<p>Leopold Toetsch found something confusing in the perl 6 compiler which
ends up generating some unexpected byte code. Peter Gibbs reckoned
that the generated code was right, but Leopold still sounds
unconvinced.</p>
<p><a href='http://groups.google.com/groups?threadm=3D5BB5DE.3080109@toetsch.at' target='_blank'>groups.google.com</a></p>
<a name='[INFO] The first pirate parrot takes to the air'></a><h2>[INFO] The first pirate parrot takes to the air</h2>
<p>Peter Gibbs chucked a cat in amongst the parrots when he posted some
performance numbers for his own private `African Grey' version of
Parrot which utilizes some GC speed up techniques that Dan had
rejected. Peter's numbers are impressive, but the techniques used
break in some places. Peter helpfully posted pointers to his original
patches. Dan wondered which bits contributed what to the improved
performance, and explained why he had problems with the approaches
that Peter was using.</p>
<p>This thread also spawned the thread called `Stack Walk Speedups?'
which was kicked off by Mike Lambert outlining the current workings of
the GC's stack walking code and wondered if anyone could come up with
a faster way of doing it (that worked in the face of the constraints
on Parrot's GC.) Peter Gibbs offered one approach, and Jason Gloudon
pointed out that his 'stack direction' config patch would help in this
area too. Jason also offered a patch giving a 12% speedup on his
machine, which was applied. Mike Lambert is also doing some cunning
stuff to improve things using Copy On Write (COW) tricks.</p>
<p><a href='http://groups.google.com/groups?threadm=018501c24533$2c672100$0b01010a@emkel.co.za' target='_blank'>groups.google.com</a></p>
<p><a href='http://groups.google.com/groups?threadm=000f01c2453d$dec0e3e0$0b01010a@emkel.co.za' target='_blank'>groups.google.com</a></p>
<p><a href='http://groups.google.com/groups?threadm=a05111b06b9832757422a@' target='_blank'>groups.google.com</a>[63.120.19.221]</p>
<p><a href='http://groups.google.com/groups?threadm=Pine.LNX.4.44.0208171342480.12965-100000@jall.org' target='_blank'>groups.google.com</a></p>
<p><a href='http://rt.perl.org/rt2/Ticket/Display.html?id=16278' target='_blank'>rt.perl.org</a></p>
<a name='[DRAFT PDD] External Data Interfaces'></a><h2>[DRAFT PDD] External Data Interfaces</h2>
<p>Brent Dax donned his Technical Author hat, and offered a draft PDD
(Parrot Design Document) covering Parrot's external data interfaces.
Nicholas Clark offered a pile of constructive criticism and discussion
is ongoing.</p>
<p><a href='http://groups.google.com/groups?threadm=00b201c24641$9c7a3b30$6501a8c0@deepblue' target='_blank'>groups.google.com</a></p>
<a name='Meanwhile, over in perl6-language'></a><h1>Meanwhile, over in perl6-language</h1>
<p>The strangely named `Autovivi' thread rolled on. Miko O'Sullivan asked
Larry for some clarification about the default behaviour of
pass-by-values, Larry wasn't sure because he hasn't worked out the
syntax yet. Luke Palmer suggested that copy-on-write tricks could be
used to do let us have our cake and eat it. Deven Corzine suggested
defaulting to doing pass-by-value, but Larry suspects that that might
make Perl 6 sub calls even slower than perl 5's. David Whipp wondered
about threading; nobody replied.</p>
<p>Deven managed to drag the thread back to its nominal subject of
Autovivification when he wondered if <code>&lt;func($x{1}{2}{3})</code>&gt; would
cause an implementation headache. Larry explained that it was cases
like this that made him choose the 'pass by immutable reference',
attempting to give the speed of pass by reference combined with the
guarantees of pass by value. Deven pressed his point and wondered what
would happen in the <code>is rw</code> case. Nicholas Clark explained how Perl 5
avoids autovivification in this case (but it's only one level
deep). Uri Guttman pointed out that this is a 'Hard Problem', but
Leopold Toetsch thought that the Parrot KEY operators may make it
relatively easy to solve.</p>
<p><a href='http://groups.google.com/groups?threadm=191690-220028213182451277@M2W058.mail2web.com' target='_blank'>groups.google.com</a></p>
<p><a href='http://groups.google.com/groups?threadm=Pine.LNX.4.33.0208130905580.5405-100000@escher.ties.org' target='_blank'>groups.google.com</a></p>
<a name='A Perl 6 class question'></a><h2>A Perl 6 class question</h2>
<p>Last week, Chris Dutton had asked about using Perl 6 to create
anonymous classes, and proposed a syntax. This week, Allison Randal
pointed him at the section of Exegesis 4 which described how to do
exactly that. Rather satisfyingly, the syntax that Chris had invented
was exactly the syntax used in the Exegesis, so the choice appears to
be natural. Trey Harris wondered about some of the other clumsinesses
in Perl 5 when defining classes, and asked some questions about class
methods. Damian confirmed that most of the clumsiness was going away,
and clarified the behaviour of <code>sub</code>s in a class definition.</p>
<p><a href='http://groups.google.com/groups?threadm=20020812154423.GA972@shadowed.net' target='_blank'>groups.google.com</a></p>
<a name='Just reading up on Pike...'></a><h2>Just reading up on Pike...</h2>
<p>Chris Dutton has been reading up on Pike, and had some observations
(whilst neglecting to explain what Pike <i>is</i>). Apparently pike allows
you to define combination types <code>&lt;private string|int bar</code>&gt; would mean
that <code>&lt;bar</code>&gt; could be a string or an int for instance. Damian wheeled
out his superpositions hobby horse and suggested <code>&lt;my any(str,int)
$bar</code>&gt;, as a way of doing this. Luke Palmer trumped that with <code>&lt;my
all(str,int) $foo</code>&gt; and wondered what such a construct would actually
<i>mean</i>. Damian suggested that it meant Luke needed some serious
therapy. Nicholas Clark got all boring and practical and wondered how
one would implement the <code>any</code> case. Damian reckons it'd just fall out
of the implementation of superpositions.</p>
<p>Somewhere in the thread, Andy Wardley asked a serious question about
what builtin types perl 6 would had, and what the results of <code>ref
$foo</code> would look like.</p>
<p><a href='http://groups.google.com/groups?threadm=F2A145AA-B0DA-11D6-9C86-0005020F8EB9@mac.com' target='_blank'>groups.google.com</a></p>
<p><a href='http://groups.google.com/groups?threadm=20020818111411.B27478@dog.ourshack.com' target='_blank'>groups.google.com</a></p>
<a name='Balanced Matches in Regexps?'></a><h2>Balanced Matches in Regexps?</h2>
<p>Peter Behroozi wondered about using Apocalypse 5 rules to capture
balanced and wondered if there shouldn't be a <code>&lt;balanced&gt;</code>
directive. Brent Dax pointed Peter at the cunning recursion
capabilities that come with Apocalypse 5:</p>
<pre>  rule parenthesized { \( ( &lt;-[()]&gt;+ | &lt;parenthesized&gt; )* \) }</pre>
<p>Larry commented that he was considering a builtin <code>&lt;self&gt;</code> rule
that'd allow one to refer to the current rule without having to name
it. Peter then offered his first attempt at a recursive rule to
capture nested HTML tables.</p>
<p><a href='http://groups.google.com/groups?threadm=1029603552.1752.58.camel@dhcppc3' target='_blank'>groups.google.com</a></p>
<a name='In brief'></a><h1>In brief</h1>
<p>Nicholas Clark patched <code>assemble.pl</code> so that it could complete its
run before the heat death of the universe when run under perl
5.005_03.</p>
<p>Jeff Goff is back and doing cool things with Ruby in parrot.</p>
<p>Jerome Quelin asked what was wanted in a patch. Consensus seems to be
either a unified or a context diff, as a mime attachment with a name
for the patch and a short description of what it does. Tests are
always good (essential) if you're adding new functionality. So are
docs.</p>
<p>Jerome also offered a patch which implemented a <code>rand</code> operator but
wondered about portability and when to call <code>srand</code>. Jeff Goff
wondered if we shouldn't implement our own 'rand' using, say, the
Mersenne Twister
(<a href='http://www-personal.engin.umich.edu/~wagnerr/MersenneTwister.html)' target='_blank'>www-personal.engin.umich.edu</a>
and Dan pointed out where srand should be called.</p>
<p>Josef H&ouml;&ouml;k reworked his multidimensional arrays patch one
more time and <i>it got applied.</i> Well done Josef, perseverance pays
off in the end.</p>
<p>Jason Gloudon added a config patch which tests the direction of stack
growth. Applied.</p>
<p>Leopold Toetsch wondered why assembler.pl uses its own <code>PMC.pm</code> instead
of the generated <code>lib/Parrot/PMC.pm</code>. Warnock's Dilemma applies.</p>
<p>Pete Sergeant has written a `quick and dirty' PASM tokenizer and a
syntax highlighter based on it.</p>
<p>Jarkko continues his sterling work of squashing Tru64 compiler
warnings.</p>
<p>Steve Fink has had a crack at adding a <code>--debugging</code> flag to
<code>Configure.pl</code>. Warnock applies.</p>
<p>Jerome Quelin won my 'making it easy to keep a running joke going'
prize when he supplied a Befunge-93 interpreter in parrot, and
commented: &quot;Note to Leon Brocard: There's a lot more to do in order to
provide a Befunge-98 compliant interpreter, so don't worry! There's
still a lot of fun waiting... :o)&quot;. Which was very good of
him. Thanks Jerome.</p>
<p>The rule/pattern/regex thing kept going. Damian explained that he'd
try and use `pattern' for the contents and `rule' for the
container. But we that we weren't to hold him to that.</p>
<p>Brent Dax has uploaded a new version of Perl6::Parameters to
CPAN. It's his attempt allowing one to declare perl 5 subroutines in a
Perl 6ish style.</p>
<a name='Who's who in Perl 6'></a><h1>Who's who in Perl 6</h1>
<ul>
<li><a name='Who are you?'></a>Who are you?</li>
<p>Daniel Alejandro Grunblatt, 21 years university student from Argentina.</p>
<li><a name='What do you do for/with Perl 6?'></a>What do you do for/with Perl 6?</li>
<p>I'm mostly doing the JIT for Parrot but occasionally move on to another
fields (like the Parrot Compiler in Parrot or the Parrot Debugger and
others).</p>
<li><a name='Where are you coming from?'></a>Where are you coming from?</li>
<p>My mother.</p>
<li><a name='When do you think Perl 6 will be released?'></a>When do you think Perl 6 will be released?</li>
<p>Some day.</p>
<li><a name='Why are you doing this?'></a>Why are you doing this?</li>
<p>I started working on the JIT to learn assembly, and I'm still learning it
(yes, I'm slow), I want to see Parrot running fast, and because it's fun.</p>
<li><a name='You have 5 words. Describe yourself.'></a>You have 5 words. Describe yourself.</li>
<p>I like playing basketball, what I haven't done for while now, and used to
like playing role games.</p>
<li><a name='Do you have anything to declare?'></a>Do you have anything to declare?</li>
<p>No.</p>
</ul>
<a name='Acknowledgements and the funding drive.'></a><h1>Acknowledgements and the funding drive.</h1>
<p>This summary was prepared with the aid of more GNER tea (on the down
train today). Sadly the GNER ham and cheese toasted sandwich has
declined; they've replaced the cheddar in the old version with
Wensleydale, which really doesn't melt as well.</p>
<p>Because I'm a bit late this week I've not had time to get the
estimable Pete Sergeant to proofread it for me, so if the spelling is
worse and the language less coherent this week, just be grateful for
Pete's sterling work on my earlier summaries.</p>
<p>Again, if your name appears in this, or any previous summary, and
you've still not sent your answers, please consider answering the
questions in the &quot;Perl 6 Who's who?&quot; section and sending your answers
to <a href='mailto:5Ws@bofh.org.uk.'>5Ws@bofh.org.uk.</a></p>
<p>Well, so far nobody dislikes my summaries enough to post an
alternative. Which is nice. If you think my time writing this is worth
anything don't give me money, give it to the Perl Foundation
<a href='http://donate.perl-foundation.org' target='_blank'>donate.perl-foundation.org</a> and help support the ongoing
development of Perl. Remember, suitably large donations will earn you
a plug in a future summary, but only if you tell me about it.</p>
</div>
